﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace AzukiMap.DataSource
{
    public abstract class TileSource : DataSource
    {
        protected List<string> _baseUris;
        protected List<double> _scales;
        protected int _tileWidth;
        protected int _tileHeight;
        protected int _dpi;

        public virtual List<string> BaseUris
        {
            get { return _baseUris; }
        }

        public List<double> Scales
        {
            get { return _scales; }
        }

        public int TileWidth
        {
            get { return _tileWidth; }
        }

        public int TileHeight
        {
            get { return _tileHeight; }
        }

        public int Dpi
        {
            get { return _dpi; }
        }

        public TileSource(string name, int srid, CoordinationUnits coordUnit)
            : base(name,DataSourceTypes.Tile, srid, coordUnit)
        {
            _baseUris = new List<string>();
            _scales = new List<double>();
        }

        public TileSource(string name, List<string> baseUris, int srid,
            CoordinationUnits coordUnit, int tileWidth, int tileHeight, List<double> scales, int dpi)
            : base(name, DataSourceTypes.Tile, srid, coordUnit)
        {
            _baseUris = baseUris;
            _tileWidth = tileWidth;
            _tileHeight = tileHeight;
            _scales = scales;
            _scales.Sort();
            _dpi = dpi;
        }

    }
}
